
void MessageHandler(SIN_CLIENT_ENTRY *BaseMessage);

//Module Map Routines
HANDLE Native_MapModuleQueryAlignment(__in wchar_t *szPathToModule,__in_opt HANDLE Pid,__in BOOLEAN MapSelf,__in BOOLEAN LoadCheckAlignment);

//Heap Routines
void *Native_CreateHeap(PHANDLE hHeap,size_t size, size_t alignment );
__checkReturn bool Native_DestroyHeap(__in HANDLE hHeap);

//Support Api
FARPROC Native_GetApi(LPWSTR ModName,PSTR ApiName);
HANDLE Native_DuplicateHandleInProcess(wchar_t *pName,ULONG HandleType);

//breakpoint Routines
void SetBits(ULONG_PTR& dw, int lowBit, int bits, int newValue);
HANDLE SetHardwareBreakpoint(__in HANDLE hThread,__in HWBRK_TYPE Type,__in HWBRK_SIZE Size,__in void* lpBreakAddress);
__checkReturn bool RemoveHardwareBreakpoint(__in HANDLE hBrk);

//Signature Routines  
ULONG FindCode(__in ULONG dwStart,__in BYTE *FindThis);

//Function Length (mostly by darawk) made native by me.
void *GetFunctionEnd(__in void *func);
void *GetBranchListFromBlock(__in void *block,__inout TreeTrunk *branchList);
void *GetBranchAddress(__in UCHAR *instr);
__checkReturn bool IsEndPoint(__in UCHAR *instr,__in void *curblock);
unsigned int GetFunctionLength(__in void *begin);
int __cdecl mlde32(__in void*codeptr);

void SuspendNormalExecution(SUSPEND_OTHERS KeepThisGoing);
//Get Pid Routine
HANDLE GetPidByName(wchar_t *pstrProcessName);

void DbgOutput(UNICODE_STRING*Unicode,NTSTATUS Status);

PBYTE transferInstruction( PBYTE destination, PBYTE source, PBYTE* jumpAddress, LONG* extra );
BOOL isJump( PCHAR instruction, ULONG instructionLength );
ULONG getNextInstruction( PCHAR pCodeSrc, ULONG ulMinBytes, PCHAR pDstBuffer, ULONG ulBufferLen );
ULONG getx86Instruction( PCHAR originalCode, PCHAR instructionBuffer, ULONG bufferLength );
bool SinSrvSetupSuspension(__inout SUSPEND_OTHERS*SuspendThreads);
bool SinSrvSetupVeHijack(__inout VEH_HIJACK_SETUP*HijackSetup);
void init_dfa();			// Prototypes for
void init_sslparser();		// various initialisation functions
void init_basicblock();		// for garbage collection safety